<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/css/iconfont.css">
    <style>
        .f-item {
            margin: 30px 20px;
            display: flex;
            align-items: center;
        }

        .f-item .label {
            font-size: 16px;
            margin-right: 7px;
            width: 60px;
            text-align: right;
        }

        .f-item .input input {
            padding: 7px;
            font-size: 18px;
            width: 230px;
        }

        .f-item button {
            padding: 10px 45px;
            border: none;
            background-color: dodgerblue;
            color: #fff;
            cursor: pointer;
        }

        .f-item button:hover {
            background-color: rgb(97, 176, 255);
        }
    </style>
<script>
    function onLoginSubmit(ev){
        ev.preventDefault()
        var form = ev.target;
        if(form.elements.user_name.value==""){
            alert('请填写用户名');
            return;
        }
        if(form.elements.password.value==""){
            alert('请填写密码');
            return;
        }
        form.submit();
    }
</script>

</head>

<body style="height: 100vh;width: 100vw;overflow: hidden;">
    <img src="/image/bg.jpg">
    <div
        style="width:1024px;height:100vh;position:absolute;left:0;top:0;background: linear-gradient(to left, #fff, transparent)">
    </div>


    <div class="card" style="width:450px;background-color: #fff;position:absolute;right:150px;top:10%;height:360px;padding:0;box-shadow: 0 0 35px #666 ;">
        <div style="font-size:16px;text-align: center;padding:15px 0;background-color: dodgerblue;width: 100%;color:#fff;">
            族谱管理系统</div>
        <div class="body" style="padding:20px;">

        <h3 style="color: dodgerblue;margin-bottom:20px;border-bottom:1px solid dodgerblue;padding-bottom:15px;">管理员登录
        </h3>
        <form action="/admin/login" method="post" onsubmit="onLoginSubmit(event)">
            <div class="f-item">
                <div class="label">用户名</div>
                <div class="input">
                    <input type="text" name="user_name" autocapitalize="off">
                </div>
            </div>
            <div class="f-item">
                <div class="label">密码</div>
                <div class="input">
                    <input type="password" name="password">
                </div>
            </div>
            <div class="f-item" style="justify-content: center;">
                <button type="submit">登录</button>
            </div>
        </form>
    </div>
    </div>
</body>
</html>